package com.sqx.modules.cityInfo.controller;

import com.sqx.common.utils.Result;
import com.sqx.modules.cityInfo.service.CityInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 城市-用户端
 * @author wuChang
 * @since 2024-01-23
 */
@RestController
@Api(value = "城市-用户端", tags = {"城市-用户端"})
@RequestMapping("/app/cityInfo/")
public class AppCityInfoController {
    @Autowired
    private CityInfoService cityInfoService;

    @ApiOperation("判断城市是否已开通")
    @GetMapping(value = "isOpenCity")
    public Result isOpenCity(String cityName) {
        return Result.success().put("data", cityInfoService.isOpenCity(cityName));
    }

}